<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>告警规则详情</title>
		<jsp:include page="css.jsp"/>
		<jsp:include page="js.jsp"/>
		<link rel="stylesheet" href="static/wechat/center/css/alarmRuleInfo.css">
	</head>
	<body>
		<div class="container">
			<div class="background"></div>

			<div class="page-header">告警规则详情</div>

			<div class="form-container">
				<table class="form-table">
					<tr>
						<td>类别</td>
						<td>
							<div class="input-group">
								<select id="alarmRuleTypeSelect" onchange="loadCodeDictData()">
									<option value="2011">实时数据</option>
									<option value="2051">分钟数据</option>
									<option value="2061">小时数据</option>
									<option value="2031">日均数据</option>
								</select>
							</div>
						</td>
					</tr>
					<tr>
						<td>参数</td>
						<td>
							<div class="input-group">
								<select id="alarmRuleCodeDictSelect"></select>
							</div>
						</td>
					</tr>
					<tr>
						<td>类型</td>
						<td>
							<div class="input-group">
								<select id="alarmRuleDataTypeSelect">
									<option value="0">低于预警</option>
									<option value="1">超过预警</option>
									<option value="2">等于预警</option>
									<option value="3">固定预警</option>
								</select>
							</div>
						</td>
					</tr>
					<tr>
						<td>蓝线值</td>
						<td>
							<div class="input-group">
								<input type="number" placeholder="0" id="alarmRuleBlueNum">
							</div>
						</td>
					</tr>
					<tr>
						<td>黄线值</td>
						<td>
							<div class="input-group">
								<input type="number" placeholder="0" id="alarmRuleYellowNum">
							</div>
						</td>
					</tr>
					<tr>
						<td>红线值</td>
						<td>
							<div class="input-group">
								<input type="number" placeholder="0" id="alarmRuleRedNum">
							</div>
						</td>
					</tr>
					<tr>
						<td>报警类别</td>
						<td>
							<div class="input-group">
								<select id="alarmRuleAlarmTypeSelect">
									<option value="1">间隔报警</option>
									<option value="2">连续报警</option>
								</select>
							</div>
						</td>
					</tr>
					<tr>
						<td>报警时间</td>
						<td>
							<div class="input-group">
								<input type="number" placeholder="0" style="width: 85%;" id="alarmRuleAlarmTime"><span id="alarmTimeUnit">秒</span>
							</div>
						</td>
					</tr>
				</table>

				<input type="hidden" id="alarmRuleId" />

				<div class="btn-container">
					<button class="btn reset-btn" id="resetBtn" onclick="resetForm()">重置</button>
					<button class="btn submit-btn" onclick="saveData(this)">提交数据</button>
				</div>
			</div>
		</div>

		<div class="message-container" id="messageContainer"></div>

		<a href="javascript:void(0)" onclick="goBack()" class="back-btn">↶</a>
	</body>
</html>
<script src="static/wechat/center/js/alarmRuleInfo.js"></script>
<script src="static/wechat/center/js/message.js"></script>